/**
 * Created by liuhaiming on 2016-05-14.
 */

requirejs.config({
    baseUrl: rootPath,
    paths: {
        "jquery" : ltePath + "/plugins/jQuery/jQuery-2.2.0.min",
        "jquery-ui" : ltePath + "/plugins/jQueryUI/jquery-ui.min",
        "bootstrap" : ltePath + '/bootstrap/js/bootstrap.min',
        "jquery.validate" : distPath + '/jquery-validation/dist/jquery.validate',
        "validator" : pagePath + '/tools/validator',
        "sparkline" : ltePath + '/plugins/sparkline/jquery.sparkline.min',
        "jquery.knob" : ltePath + '/plugins/knob/jquery.knob',
        "moment" : distPath + '/moment/min/moment.min',
        "daterangepicker" : ltePath + '/plugins/daterangepicker/daterangepicker',
        "bootstrap-datepicker" : ltePath + '/plugins/datepicker/bootstrap-datepicker',
        "jquery.slimscroll" : ltePath + '/plugins/slimScroll/jquery.slimscroll.min',
        "fastclick" : ltePath + '/plugins/fastclick/fastclick',
        "app" : ltePath + '/dist/js/app.min'
    },

    shim: {
        "bootstrap": {
            deps: ['jquery'],
                exports: 'bootstrap'
        },
        "jquery-ui":{
            deps: ['jquery'],
            exports: 'jquery-ui'
        },
        "bootstrap-datepicker" : ['jquery'],
        "jquery.knob" : ['jquery'],
        "jquery.slimscroll" : ['jquery'],
        "app" : ['jquery', 'bootstrap']
    }

});

require(['jquery'
    ,'jquery-ui'
    ,'bootstrap'
    ,'jquery.validate'
    ,'validator'
    ,'sparkline'
    ,'moment'
    ,'daterangepicker'
    ,'bootstrap-datepicker'
    ,'jquery.knob'
    ,'jquery.slimscroll'
    ,'fastclick'
    ,'app'],
    function($){
        $.widget.bridge('uibutton', $.ui.button);
    }
);